$(function () {
    init();

    function init() {
        yhjData();
        eventList();
    }
    // 获取优惠券的数据
    function yhjData() {
        $.ajax({
            type: "get",
            url: "http://193.112.55.79:9090/api/getcoupon",
            dataType: "json",
            success: function (result) {
                let yhjData = result.result;
                console.log(result)                
            
                let html = '';
                for (let i = 0; i < yhjData.length; i++) {
                   
                    html += ` <li>
                    <a href="mmm_getcouponproduct.html?couponid=${i}&title=${yhjData[i].couponTitle}">
                        <img src="//img.alicdn.com/imgextra/i2/385622363/TB2QUfWqAZmBKNjSZPiXXXFNVXa_!!385622363.jpg_640x640q85s150_.webp" alt="">
                        <div class="yhj_name">${yhjData[i].couponTitle}</div>
                    </a>
                </li>`
                }
                $('.yhj_t_list').html(html);


               
            }
        });

    }
    function eventList() {

    }
})